A Ternary Content Addressable Memory (“TCAM”) is a type of computer memory used in certain high speed searching applications, such as routing information through a network. It is designed such that it receives a data word (e.g., a key in a packet header) and performs parallel matches of that word against every entry in the TCAM in a single clock cycle. Each TCAM entry can store a flow rule comprising a key, an action, and a priority.
TCAMs are often used in network routers. In many routers, the TCAMs may be organized into banks, each of which comprises a set of TCAM entries. The banks may have variable widths, where the width is inversely proportional to a capacity of the bank. For example, a bank may support 1000 entries of 72 bits, 512 entries of 144 bits, or 256 entries of 288 bits. An incoming packet is matched against all entries in all banks. If the packet matches multiple TCAM entries in a bank, the entry of lowest index (e.g., highest priority) is selected and its action is applied to the packet. If the packet matches multiple entries from multiple TCAM banks, the entry of lowest index in the bank of lowest index is selection and its action is applied to the packet.
TCAMs have been widely used in routers, switches, and network security appliances of high speed networks to implement packet flow rules, e.g., access control list (“ACL”) call rules. They may be used for various applications, including packet filtering, forwarding, traffic load balancing and shaping.